class StateCode {
  // Connection status
  static const int CONNECTION_OK = 1;
  static const int CONNECTION_FAILED = 2;
  static const int CONNECTION_DISCONNECT = 0;
  static const int CONNECTION_CONNECTING = 3;

  @Deprecated('Use CONNECTION_OK instead')
  static const int CONNECTION_CONNECTED = 4;

  // Status
  static const int STATUS_SUCCESS = 0;
  static const int STATUS_FAIL = 1;
  static const int STATUS_UNKOWN_CMD = 2;
  static const int STATUS_BUSY = 3;
  static const int STATUS_NO_RESOURCE = 4;
  static const int STATUS_CRC_ERROR = 5;
  static const int STATUS_ALL_DATA_CRC_ERROR = 6;
  static const int STATUS_PARAMETER_ERROR = 7;
  static const int STATUS_RESPONSE_DATA_OVER_LIMIT = 8;

  // Result
  static const int RESULT_OK = 0;
  static const int RESULT_FAIL = 1;
  static const int RESULT_CAN_UPDATE = 0;
  static const int RESULT_DEVICE_LOW_VOLTAGE_EQUIPMENT = 1;
  static const int RESULT_FIRMWARE_INFO_ERROR = 2;
  static const int RESULT_FIRMWARE_VERSION_NO_CHANGE = 3;
  static const int RESULT_TWS_NOT_CONNECT = 4;
  static const int RESULT_HEADSET_NOT_IN_CHARGING_BIN = 5;

  // Upgrade result
  static const int UPGRADE_RESULT_COMPLETE = 0;
  static const int UPGRADE_RESULT_DATA_CHECK_ERROR = 1;
  static const int UPGRADE_RESULT_FAIL = 2;
  static const int UPGRADE_RESULT_ENCRYPTED_KEY_NOT_MATCH = 3;
  static const int UPGRADE_RESULT_UPGRADE_FILE_ERROR = 4;
  static const int UPGRADE_RESULT_UPGRADE_TYPE_ERROR = 5;
  static const int UPGRADE_RESULT_ERROR_LENGTH = 6;
  static const int UPGRADE_RESULT_FLASH_READ = 7;
  static const int UPGRADE_RESULT_CMD_TIMEOUT = 8;
  static const int UPGRADE_RESULT_DOWNLOAD_BOOT_LOADER_SUCCESS = 128;

  // Scan type
  static const int SCAN_TYPE_FLAG_CONTENT = 0;

  @Deprecated('Deprecated in Java')
  static const int SCAN_TYPE_FLAG_PAIRED = 1;
  @Deprecated('Deprecated in Java')
  static const int SCAN_TYPE_FLAG_PHONE_VIRTUAL_ADDRESS = 2;
  @Deprecated('Deprecated in Java')
  static const int SCAN_TYPE_FLAG_PID = 3;
  @Deprecated('Deprecated in Java')
  static const int SCAN_TYPE_FLAG_EDR_MESSAGE = 4;

  // TWS headset status
  static const int TWS_HEADSET_STATUS_DIMISS = 0;
  static const int TWS_HEADSET_STATUS_DISCONNECTED = 1;
  static const int TWS_HEADSET_STATUS_CONNECTED = 2;
  static const int TWS_HEADSET_STATUS_CONNECTING = 3;

  // Advanced settings error
  static const int ADV_SETTINGS_ERROR_IN_GAME_MODE = 1;
  static const int ADV_SETTINGS_ERROR_DEVICE_NAME_LENGTH_OVER_LIMIT = 2;
  static const int ADV_SETTINGS_ERROR_LED_SETTINGS_FAILED = 3;
}
